#ifndef CONNECTTCPIP_H
#define CONNECTTCPIP_H

using namespace System;
using namespace System::Net;
using namespace System::Net::Sockets;
using namespace std;

ref class connectTCPIP {
private:
	TcpListener^ monListener;
	TcpClient^ tcpClientServer;
	TcpClient^ monClient;
	NetworkStream^ leStreamServer;
	NetworkStream^ leStreamClient;
	IPAddress^ ipServeurAddress;
	Int32 portServer;
public:
	connectTCPIP(void);
	void startServer(Int32);
	bool startListener();
	void startClient(String^,Int32);
	void stopServer();
	void stopClient();
	void stopStreamServer();

	String^ getMessage(bool);
	void setMessage(String^, bool);

	IPAddress^ getIP(void);
};

#endif